home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1997 / HAM Radio 1997.iso / vcls / reswatch / reswatch.pas < prev    next >
Pascal/Delphi Source File  |  1996-04-08  |  1KB  |  60 lines

  1. unit ResWatch;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, ExtCtrls, StdCtrls, Gauges, Buttons;
  8.  
  9. type
  10.   TRWMain = class(TForm)
  11.     RWMainPanel: TPanel;
  12.     SystemLabel: TLabel;
  13.     GDILabel: TLabel;
  14.     UserLabel: TLabel;
  15.     FreeMemLabel: TLabel;
  16.     FreeMemSize: TLabel;
  17.     ResourceTimer: TTimer;
  18.     UserPanel: TPanel;
  19.     UserGauge: TGauge;
  20.     GDIPanel: TPanel;
  21.     GDIGauge: TGauge;
  22.     SystemPanel: TPanel;
  23.     SystemGauge: TGauge;
  24.     ExitButton: TSpeedButton;
  25.     procedure ResourceTimerTimer(Sender: TObject);
  26.     procedure ExitButtonClick(Sender: TObject);
  27.     procedure FormCreate(Sender: TObject);
  28.   private
  29.     { Private declarations }
  30.   public
  31.     { Public declarations }
  32.   end;
  33.  
  34. var
  35.   RWMain: TRWMain;
  36.  
  37. implementation
  38.  
  39. {$R *.DFM}
  40. procedure TRWMain.ResourceTimerTimer(Sender: TObject);
  41. begin
  42.   UserGauge.Progress := GetFreeSystemResources(GFSR_UserResources);
  43.   GDIGauge.Progress := GetFreeSystemResources(GFSR_GDIResources);
  44.   SystemGauge.Progress := GetFreeSystemResources(GFSR_SystemResources);
  45.   FreeMemSize.Caption := IntToStr(GetFreeSpace(0))+' bytes';
  46. end;
  47.  
  48. procedure TRWMain.ExitButtonClick(Sender: TObject);
  49. begin
  50.   Close;
  51. end;
  52.  
  53. procedure TRWMain.FormCreate(Sender: TObject);
  54. begin
  55.   Application.HintColor := clAqua;
  56.   Application.HintPause := 0;
  57. end;
  58.  
  59. end.
  60.